/**
 * 取n个随机数，范围为range
 * @param n
 * @param range
 * @returns {Array}
 */
function randomData(n, range) {
    var arr = [];
    var value;
    while (arr.length < n) {
        value = parseInt(Math.random() * range);
        var k = 0;
        for (; k < arr.length; k++) {

            if (arr[k] == value) {
                break;
            }
        }
        if (k == arr.length) {
            arr.push(value);
        }
    }
    return arr;
}

/**
 * 播放音乐
 * @param url
 */
function play_sound(url) {
    var mu = document.getElementById('music');
    mu.src = url;
    mu.play();
}